package org.tacticalTroopers.jme.server.object;

import org.tacticalTroopers.jme.common.message.Element;


public class ServerBullet extends ServerElement{

	ServerPlayer owner;
	Integer nbCollisionAllowed = 1;
	Integer timeToLive = 60;

	public Integer getNbCollisionAllowed() {
		return nbCollisionAllowed;
	}

	public void setNbCollisionAllowed(Integer nbCollisionAllowed) {
		this.nbCollisionAllowed = nbCollisionAllowed;
	}

	protected ServerBullet(){
		super();
		setMass(0.1f);
		setSize(0.1f,0.1f,0.1f);
		element.setType(Element.BULLET);
	}

	

	public ServerPlayer getOwner() {
		return owner;
	}

	public void setOwner(ServerPlayer owner) {
		this.owner = owner;
	}

	@Override
	public String toString() {
		return "Bullet "+super.toString();
	}

	public Integer getTimeToLive() {
		// TODO Auto-generated method stub
		return timeToLive;
	}

	public void decrementTimeToLive() {
		timeToLive--;
	}


}
